public class Remove {
    //删除数组中的重复项
    public void removeDuplicates(int[] nums) {

    }
    public static void remove(int[] nums) {
        int count = 1;
        for (int i = 0; i < nums.length; i++) {
            if(i == nums.length-1) {
                break;
            }
            if (nums[i] == nums[i+1]) {
                for (int j = i; j < nums.length; j++) {
                    if(j == nums.length-1) {
                        break;
                    }
                    nums[j] = nums[j+1];
                }
            }else {
                count++;
            }
        }
        for (int i = 0; i < count; i++) {
            System.out.println(nums[i]);
        }
    }
}
